#ifndef _SESSIONFACTORY_H
#define _SESSIONFACTORY_H

#include "objpool.h"
#include "appsession.h"

struct sessionFactory {
	struct obj_pool *session_pool;
};
typedef struct sessionFactory SessionFactory;

extern SessionFactory* sessionFactory_build(size_t session_len, size_t count);
extern int sessionFactory_release(SessionFactory *factory);

extern AppSession* session_new(SessionFactory *factory);
extern int session_del(SessionFactory *factory, AppSession *session);

#endif
